<html>
<head>
    <title>Test For Ext JS Ajax</title>
    <meta charset="UTF-8">

    <link rel="stylesheet" type="text/css" href="ext-4.2.1.883/ext-all.js">
    <script type="text/javascript" src="ext-4.2.1.883/ext-all-debug.js"></script>
    <script type="text/javascript" src="ext-4.2.1.883/locale/ext-lang-zh_CN.js"></script>




</head>

<body>
<script type="text/javascript">
    function getJSON() {
        var text = null;
        Ext.Ajax.request({
            url:'user.json',
            params:{
                id:1
            },
            success: function(response){
                text = response.responseText;
                var users = eval('(' + text + ')');
                document.getElementById("name").innerHTML = users.name;
            }
        });
    }
</script>

    <script type="text/javascript">
        alert("2" + text);
    </script>

<p id="name"></p>

<p id="age"></p>

<button onclick="getJSON()">GET JSON</button>

</body>
</html>
